package bo;

/**
 * this class will be a Company object
 * @author Nikolai Straessle
 *
 */
public class Company {
	
	private static Company instance = null;
	
	private String name;
	private String preName;
	private String companyName;
	
	/**
	 * this constructor will create an Company object
	 * @param name
	 * @param preName
	 * @param companyName
	 */
	public Company(String name, String preName, String companyName) {
		
		setName(name);
		setPreName(preName);
		setCompanyName(companyName);
		
	}
	/**
	 * Create a Singleton Company object
	 * @param name
	 * @param preName
	 * @param companyName
	 * @return
	 * 		Company
	 */
	public static Company getInstance(String name, String preName, String companyName){
		if(instance == null){
			instance = new Company(name, preName, companyName);
		}
		return instance;
	}
	
	/**
	 * call a singelton Company object
	 * @return
	 * 		Company
	 */
	public static Company getInstance(){
		return instance;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPreName() {
		return preName;
	}

	public void setPreName(String preName) {
		this.preName = preName;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	
	

}
